package com.kumi.crowd.util;

import javax.servlet.http.HttpServletRequest;

public class CrowdUtil {

    public static boolean requestType(HttpServletRequest request){

        String accept = request.getHeader("Accept");
        String header = request.getHeader("X-Requested-With");

        if ((accept != null && accept.contains("application/json")) || (header != null && header.contains("XMLHttpRequest"))){
            return true;
        }
        return false;
    }
}
